const express = require("express");
const router = express.Router();
const artcateHandler = require('../router_handler/artcate');
const expressJoi = require("@escook/express-joi");
const { deleteIDSchema, updateCateSchema } = require("../schema/artcate");
// 获取文章分类列表
router.get("/cates", artcateHandler.cate);
// 新增文章分类
router.post("/addCate", artcateHandler.addCate);
// 删除文章分类
router.delete('/deleteCate/:id', expressJoi(deleteIDSchema), artcateHandler.deleteCateById);
// 更新文章分类
router.put('/updateCate/:id', expressJoi(updateCateSchema), artcateHandler.updateCateById);
module.exports = router;